Skip to content

svg.elements.tspan - Firefox 137.0.2 does not support lengthAdjust / textLength attributes #26945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mikekaganski opened this issue May 30, 2025 · 2 comments
Labels
data:svg Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG p2 High priority – Community PRs highly encouraged.

Comments

@mikekaganski
Copy link

mikekaganski commented May 30, 2025

What type of issue is this?

Incorrect support data (example: BrowserX says "86" but support was added in "40")

What information was incorrect, unhelpful, or incomplete?

The MDN article claims full support for lengthAdjust and textLength attributes in tspan since FF 1.5. However, these are unsupported at least in FF 137.0.2. This may be seen in MDN playground https://developer.mozilla.org/en-US/play, where the following works fine:

<svg viewBox="0 0 200 60" xmlns="http://www.w3.org/2000/svg">
  <text y="20" textLength="5em">Small text length</text>
  <text y="40" textLength="150px">Big text length</text>
</svg>

but this doesn't scale text in FF (but works fine in e.g. Chrome):

<svg viewBox="0 0 200 60" xmlns="http://www.w3.org/2000/svg">
  <text y="20"><tspan textLength="5em">Small text length</tspan></text>
  <text y="40"><tspan textLength="150px">Big text length</tspan></text>
</svg>

What browsers does this problem apply to, if applicable?

Firefox

What did you expect to see?

The expectation is that both snippets shown above provide a picture like this:

Image

Did you test this? If so, how?

As mentioned, the playground in FF shows the expected picture for the former snippet, but this for the latter snippet:

Image

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

https://bugzilla.mozilla.org/show_bug.cgi?id=890692

Do you have anything more you want to share?

No response

MDN URL

https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/tspan

MDN metadata

MDN page report details
  • Query: svg.elements.tspan
  • Report started: 2025-05-30T12:23:04.703Z
@mikekaganski mikekaganski added the needs triage This issue needs to be confirmed label May 30, 2025
@github-actions github-actions bot added the data:svg Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG label May 30, 2025
@caugner
Copy link
Contributor

caugner commented May 30, 2025

Confirmed with this JSBin.

Let's update the Firefox support statements to { version_added: false } along with the mentioned Firefox bug as impl_url here:

"firefox": {
"version_added": "1.5"
},

"firefox": {
"version_added": "1.5"
},

@mikekaganski Would you like to open a PR with these changes? 🙏

@caugner caugner added p2 High priority – Community PRs highly encouraged. and removed needs triage This issue needs to be confirmed labels May 30, 2025
@mikekaganski
Copy link
Author

Would you like to open a PR with these changes?

No thanks; that's your change, I would only copypaste it :-) so it's in no way would be mine. I appreciate your confirmation, and your offer, though :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:svg Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG p2 High priority – Community PRs highly encouraged.
Projects
None yet
Development

No branches or pull requests

2 participants